from flask import Flask
from database.database import db
app = Flask(__name__)

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:6541230MSq@localhost:3306/doc_ai?charset=utf8'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config["SECRET_KEY"] = "doc-ai-1234567cahwuocnjdavsuiulhoicn"
db.init_app(app)


@app.route('/')
def hello_world():
    return 'Hello World!'


from interrogate import interrogate_blue
from admin import admin_blue
from user import user_blue
from medicine import medicine_blue
from medirecord import medirecord_blue

app.register_blueprint(admin_blue)
app.register_blueprint(user_blue)
app.register_blueprint(interrogate_blue)
app.register_blueprint(medicine_blue)
app.register_blueprint(medirecord_blue)


if __name__ == '__main__':
    app.run(port=5678,debug=True)